package servlet;

import java.io.IOException;

import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import service.BorrowService;
import vo.BorrowRetuenBean;

public class BookReturnShow extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
		throws ServletException, IOException {
	// TODO Auto-generated method stub
	resp.setContentType("text/html");
	resp.setCharacterEncoding("utf-8");
	req.setCharacterEncoding("utf-8");
	BorrowService bs=new BorrowService();
	List<BorrowRetuenBean> borrow = bs.getAll();
	req.setAttribute("borrows", borrow);
	req.getRequestDispatcher("/jsp/returnBook.jsp").forward(req, resp);
}
@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
	doGet(req, resp);
	}
}
